import { get, post } from '../http';

/**
 * 车间工序
 */
export function processScan() {
    return {
        //获取车间工序扫描列表
        getProcessList: ({ page, limit }: any, params: any) => { 
            return post({
                url: `/dwWorkShop/workshopProcess/findWorkshopProcess?page=${page}&limit=${limit}`,
                data: params
            })
        },
 
        //扫描 车间工序
        getFlowProcess: ({ flowCardCode }: any) => {
            return get({
                url: `/aps/circulatCard/findWorkshopProcess?flowCardCode=${flowCardCode}`
            })
        },  

        //新增车间
        addSaveShopProcess:(params:any) => {
            return post({
                url:"/dwWorkShop/workshopProcess/saveWorkshopProcess",
                data:params 
            })
        },
 
        //修改
        editProcess:(params:any) => {
            return post({
                url:"/dwWorkShop/workshopProcess/updateScanWorkshop",
                data:params
            })
        },
        
        //车间扫描 查询
        getProcessAdjust: ({ page, limit }: any, params: any) => {
            return post({
                url: `/dwWorkShop/workshopProcess/findCirculatCardAdjust?page=${page}&limit=${limit}`,
                data: params
            })
        }
    }
}